package com.example.librarymanagementsystembackend.usermanagement.entity;

import lombok.Data;

/**
 * 用户基本信息类
 */
@Data
public class User {
    private Integer id;             // 用户唯一标识符
    private String username;        // 用户名
    private String password;        // 密码（加密存储）
    private Boolean isAdmin;        // 是否为管理员
    private UserProfile profile;    // 用户扩展信息

    public User() {
    }

    public User(Integer id, String username, String password, Boolean isAdmin, UserProfile profile) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.isAdmin = isAdmin;
        this.profile = profile;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", isAdmin=" + isAdmin +
                ", profile=" + profile +
                '}';
    }
}